<div class="body-left" id="divBody_Left">
    <!--TN 11.10-->
    <div itemtype="http://data-vocabulary.org/Product" itemscope="" class="detail-deal detail-deal-trans" id="DealInfo">
        <div class="bg-detaildeal"></div>
        <h2 class="titledeal" itemprop="name">
            <strong style="color:#FF9900;font-weight:normal;font-size:21px"><{$grouponEntity->groupon_name}>:</strong>
            <p><{$grouponEntity->title}></p>
        </h2>
        <div class="orderdeal">
            <div itemtype="http://data-vocabulary.org/Offer" itemscope="" itemprop="offerDetails" class="box-white-info">
                <div class="detail-deal-info">
                    <p class="margin-negative" itemprop="price"><{$dealsEntity->sale_price|number_format}><strong itemprop="currency"> VNĐ</strong></p>
                    <p><a class="view-button" name="" href="<{$APPLICATION_URL}>/Browse/Deals/BuyDeal/city/<{$city}>/id/<{$dealsEntity->id}>"></a>
                    </p>
                    <div class="box-white-info-price">
                        <p>Giá gốc: <span><{$dealsEntity->original_price|number_format}></span> VNĐ</p>
                    </div><div class="box-white-info-sale">
                        <div class="box-white-info-save">
                            <span class="number"><{$perDiscount}>%</span>
                            <span>tiết kiệm</span>
                        </div>
                        <div class="box-white-info-buyer">
                            <span class="number"><{$dealsEntity->bought_count}></span>
                            <span>người mua</span>
                        </div>
                        <div class="box-white-info-time">
                            <span id="Time_CountDown_1962" class="number">46:15:4</span>
                            <span>thời gian còn lại</span>
                        </div>
                        <div class="clear"></div>

                    </div>
                    <div class="progess-bar">
                    <{if $dealsEntity->bought_count < $dealsEntity->min_bought}>
                        <div class="bg-progess-bar">
                            <div class="inner-progess-bar">
                                <span style=" width:<{math equation = "bought_count/min_bought *100" bought_count=$dealsEntity->bought_count min_bought=$dealsEntity->min_bought}>%" class="progess">
                                    <em class="progess-arrow"></em>
                                </span>
                            </div>
                        </div>
                        <em>cần <i><{$dealsEntity->min_bought}></i> người để được giá tốt</em>
                     <{/if}>
                    </div>
                </div>
                <div style="overflow:visible;padding-left:5px;" id="divLinkSharing" class="fullview-links">
                    <div style="float:left;width:70px;margin-left:7px;" class="googleplus"><div id="___plusone_0" style="height: 20px; width: 90px; display: inline-block; text-indent: 0pt; margin: 0pt; padding: 0pt; background: none repeat scroll 0% 0% transparent; border-style: none; float: none; line-height: normal; font-size: 1px; vertical-align: baseline;">
                            <iframe width="100%" scrolling="no" frameborder="0" title="+1" vspace="0" tabindex="-1" style="position: static; left: 0pt; top: 0pt; width: 90px; margin: 0px; border-style: none; height: 20px; visibility: visible;" src="https://plusone.google.com/_/+1/fastbutton?url=http%3A%2F%2Fwww.nhommua.com%2Ftp-ho-chi-minh%2Fdeals%2Frossmax-may-do-huyet-ap-co-tay-7F010806067C.html%3Futm_source%3Dgoogle%26utm_medium%3Dgoogle_share_nhommua%26utm_campaign%3Dgoogle_share&amp;size=medium&amp;count=true&amp;annotation=&amp;width=70&amp;hl=en-US&amp;jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fwidget%2F__features__%2Frt%3Dj%2Fver%3D1P3lGtDGQkU.vi.%2Fsv%3D1%2Fam%3D!C0fEz9_x4jKIpDHgug%2Fd%3D1%2F#id=I1_1322455682388&amp;parent=http%3A%2F%2Fwww.nhommua.com&amp;rpctoken=763139651&amp;_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe" name="I1_1322455682388" marginwidth="0" marginheight="0" id="I1_1322455682388" hspace="0" allowtransparency="true"></iframe>
                        </div>
                    </div>
                    <div style="float:left;margin:0;" class="zing">
                        <a style="background:none;margin:0;padding-left:0px;margin-right:5px;display:block" name="Rossmax Máy Đo Huyết Áp Cổ Tay" href="http://link.apps.zing.vn/share?url=http%3a%2f%2fwww.nhommua.com%2ftp-ho-chi-minh%2fdeals%2frossmax-may-do-huyet-ap-co-tay-7F010806067C.html%3futm_source%3dzing%26utm_medium%3dzing_share_nhommua%26utm_campaign%3dzing_share&amp;Rossmax+M%c3%a1y+%c4%90o+Huy%e1%ba%bft+%c3%81p+C%e1%bb%95+Tay"></a>
                    </div>
                    <div style="width:130px;float:left;text-align:left;margin-left:10px;overflow:visible;_overflow:hidden;margin-top:6px;" class="like"><fb:like href="http%3a%2f%2fwww.nhommua.com%2ftp-ho-chi-minh%2fdeals%2frossmax-may-do-huyet-ap-co-tay-7F010806067C.html%3futm_source%3dfacebook%26utm_medium%3dfacebook_share_nhommua%26utm_campaign%3dfacebook_share" send="true" layout="button_count" width="125" class=" fb_edge_widget_with_comment fb_iframe_widget"><span><iframe scrolling="no" id="f8b5c31561eb84" name="f2fcf1006f52d66" style="border: medium none; overflow: hidden; height: 20px; width: 150px;" title="Like this content on Facebook." class="fb_ltr" src="http://www.facebook.com/plugins/like.php?channel_url=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D3%23cb%3Df8473c3066816%26origin%3Dhttp%253A%252F%252Fwww.nhommua.com%252Ff39dbfdad6797d2%26relation%3Dparent.parent%26transport%3Dpostmessage&amp;extended_social_context=false&amp;href=http%253a%252f%252fwww.nhommua.com%252ftp-ho-chi-minh%252fdeals%252frossmax-may-do-huyet-ap-co-tay-7F010806067C.html%253futm_source%253dfacebook%2526utm_medium%253dfacebook_share_nhommua%2526utm_campaign%253dfacebook_share&amp;layout=button_count&amp;locale=en_US&amp;node_type=link&amp;sdk=joey&amp;send=true&amp;show_faces=false&amp;width=150"></iframe></span></fb:like>
                        <div class=" fb_reset" style="float:right" id="fb-root"><script async="" src="http://connect.facebook.net/en_US/all.js"></script>
                        </div>
                    </div>
                    <div style="clear:both;height:0px;"></div>

                </div>

            </div>

            <div class="detail-deal-photo"><div id="divIMG">  <a rel="lightbox[roadtrip]" style="position: absolute; opacity: 0.27928;" id="aimgIndexBig1" class="photo" name="" href="javascript:void(0)">   <img width="478" height="295" id="imgShow1" title="VINASIM" alt="VINASIM" src="http://www.nhommua.net/Upload/2092/large/VINASIM_201111231644578.jpg" itemprop="image">   <span class="title"><em>VINASIM</em></span><span style="display:none" class="zoom-photo"><em>Xem ảnh lớn</em></span> </a><a rel="lightbox[roadtrip]" style="position: absolute; display: block; opacity: 0.7272;" id="aimgIndexBig2" class="photo" name="" href="javascript:void(0)"><img width="420" height="260" id="imgShow2" title="VINASIM" alt="VINASIM" src="http://www.nhommua.net/Upload/2092/large/VINASIM_20111123164457396.jpg" itemprop="image"><span class="title"><em id="strTitleIMG">VINASIM</em></span><span style="display: none;" class="zoom-photo"><em>Xem ảnh lớn</em></span> </a></div> <div id="div_MainLIMG" class="photo-slide" style="display: block;"><span id="btnPreIMG" class="btn-prev" style="display: block;"></span><ul id="div_IMGList" class="photo-slide-inner"><li id="dListImg_10"><a href="javascript:void(0)" name=""><img width="89" height="54" onclick="javascript:selectImage(this, 0, 10);" src="http://www.nhommua.net/Upload/2092/small/VINASIM_20111123164456806.jpg"></a><i style="display: none;"></i></li><li id="dListImg_11"><a href="javascript:void(0)" name=""><img width="89" height="54" onclick="javascript:selectImage(this,1, 11);" src="http://www.nhommua.net/Upload/2092/small/VINASIM_201111231644578.jpg"></a><i style="display: none;"></i></li><li id="dListImg_12"><a href="javascript:void(0)" name=""><img width="89" height="54" onclick="javascript:selectImage(this,2, 12);" src="http://www.nhommua.net/Upload/2092/small/VINASIM_20111123164457396.jpg"></a><i style="display: block;"></i></li><li id="dListImg_13"><a href="javascript:void(0)" name=""><img width="89" height="54" onclick="javascript:selectImage(this,3, 13);" src="http://www.nhommua.net/Upload/2092/small/VINASIM_20111123164457683.jpg"></a><i style="display: none;"></i></li><li id="dListImg_14"><a href="javascript:void(0)" name=""><img width="89" height="54" onclick="javascript:selectImage(this,4, 14);" src="http://www.nhommua.net/Upload/2092/small/VINASIM_2011112316445893.jpg"></a><i style="display: none;"></i></li></ul><span id="btnNextIMG" class="btn-next" style="display: block;"></span></div>  </div>
        </div>
        <div class="clear"></div>
        <div class="bg-deal-condi">
            <em class="line"></em>
            <div class="detail-deal-condi">
                <div class="condi-deal-col">
                    <p style="color:#0099ff" class="title">Điểm Nổi Bật</p>
                    <div id="highlights-deal">
                        <{$grouponEntity->hightlight}>
                    </div>
                </div>
                <div class="condi-deal-col">
                    <p style="color:#0099ff" class="title">Điều Kiện</p>
                    <div id="condi-deal">
                        <{$dealsEntity->fine_print}>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--end TN 11.10-->

<div class="comments-deal">
                            	<div class="detail-deal">
                            	<form action="">
                                    <div class="write-comment">
                                        <p>Bình luận <span></p>
                                        <p class="write-comment-content">
                                            <span><textarea placeholder="Viết bình luận cho deal này" id="txtCommentDeal" class="textareaCP"></textarea></span>
                                            <span class="write-comment-btn">
                                                <a class="view-button" id="btnSendd" href="javascript:void(0);"></a>
                                            </span>
                                        </p>
                                    </div>                            	
                                </div>
                            	<div class="list-comments" id="ulComment">
                            	<{foreach from=$listComment item=item}>
                            	<div class="comment-content">
                            	<div class="detail-deal">
                            	<p><{$item.comment_text}></p>
                            	<p class="user-info">
                            	<a name="" href="#"><{$item.fullname}></a>
                            	 - <{$item.date_post}></p>
                            	 <div onclick="showSubCommentSP(133165)" style="cursor: pointer;" class="total-comment">
                            	 <span class="icon-comment">
                            	 </span>
                            	 <span id="subCount_133165" class="num-comment">0 lời bình</span>
                            	 </div>
                            	 </div>
                            	 <i>
                            	 </i>
                            	 <div class="comment-content-right">
                            	 <img width="50" height="50" src="<{$userEntity->getImage($item.picture)}>" alt="<{$item.fullname}>">
                            	 </div>
                            	 <div class="clear">
                            	 </div></div>
                            	 <{/foreach}>
                            	 <div style="display:none" id="divSubComment_133165">
                            	 </div>
                            	 </div>
                               
                            </div>

   </div>


<script type="text/javascript">

//jQuery(document).ready(function() {			
	jQuery('#btnSendd').click(function(e){
		<{if $hasLoggedIn == true && $loggedInUserType == "MEMBER"}>
		if(jQuery('#txtCommentDeal').val() == ''){
			alert('vui long nhap text');	
		}else{
		jQuery.ajax({
				type : "POST",
				cache : false,
				dataType: 'json',
				url : "<{$APPLICATION_URL}>/Browse/DealComment/comment",
				data : 'user_id='+<{$currentUser->id}>+'&deal_id='+<{$dealsEntity->id}>+'&comment_text='+jQuery('#txtCommentDeal').val(),
				success: function(obj) {

					var htmlReturn = '<div class="comment-content"><div class="detail-deal"><p>'+obj['comment_text']+'</p><p class="user-info"><a href="http://www.nhommua.com/tp-ho-chi-minh/profile/comments.aspx?mid=792259" name="">'+obj['fullname']+'</a>'+obj['datetime']+'</p><div class="total-comment" style="cursor: pointer;" onclick="showSubCommentSP(133165)"><span class="icon-comment"></span><span class="num-comment" id="subCount_133165">0 lời bình</span></div></div><i></i><div class="comment-content-right"><img width="50" height="50" alt="Member_792259" src="http://image.nhommua.com/Profiles/avatar/20.jpg"></div><div class="clear"></div></div>'
					var html = jQuery('#ulComment').html();
						html = htmlReturn + html;
						jQuery('#ulComment').html(html);
				}
				});
		}
		<{else}>
		window.location='<{$APPLICATION_URL}>/Browse/Deals/LoginBuy/id/3/city/1/return_url/authenEquaLBrowseAnDcontrolEquaLDealCommentAnDactionEquaLIndexAnDidEquaL3AnDcityEquaL1';
		<{/if}>
		});
	
	//});
CountBack("Time_CountDown_1962", "<{$duration}>");
                                 /*
                            Author:		Robert Hashemian (http://www.hashemian.com/)
                            Modified by:	Munsifali Rashid (http://www.munit.co.uk/)
                            Modified by:	Tilesh Khatri
                                 */

                                function StartCountDown(myDiv,myTargetDate)
                                {
                                    var dthen	= new Date(myTargetDate);
                                    var dnow	= new Date();
                                    ddiff		= new Date(dthen-dnow);
                                    gsecs		= Math.floor(ddiff.valueOf()/1000);
                                    CountBack(myDiv,gsecs);
                                }

                                function Calcage(secs, num1, num2)
                                {
                                    s = ((Math.floor(secs/num1))%num2).toString();
                                    if (s.length < 2)
                                    {
                                        s = "0" + s;
                                    }
                                    return (s);
                                }

                                function CountBack(myDiv, secs)
                                {
                                    var DisplayStr;
                                    var DisplayFormat = "%%D%% ngày %%H%%:%%M%%:%%S%%";
                                    //var DisplayFormat = "%%H%%:%%M%%:%%S%%";
                                    DisplayStr = DisplayFormat.replace(/%%D%%/g,	Calcage(secs,86400,100000));
                                    DisplayStr = DisplayStr.replace(/%%H%%/g,		Calcage(secs,3600,24));
                                    DisplayStr = DisplayStr.replace(/%%M%%/g,		Calcage(secs,60,60));
                                    DisplayStr = DisplayStr.replace(/%%S%%/g,		Calcage(secs,1,60));
                                    if(secs > 0)
                                    {
                                        document.getElementById(myDiv).innerHTML = DisplayStr;
                                        document.getElementById('Time_CountDown_0').innerHTML = DisplayStr;
                                        setTimeout("CountBack('" + myDiv + "'," + (secs-1) + ");", 990);
                                    }
                                    else
                                    {
                                        if($('#isReloadPage').get('value')=='0'){
                                            window.location.reload();
                                        }
                                       // $('#deal .theend_deal').setStyle('display','block');
                                    }
                                }
                                   
                                </script>